home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
et
/
et-2_2.lha
/
et2.2
/
examples
/
guard
/
guard.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-12-04
|
400b
|
39 lines
//$A,B$
#include "Object.h"
extern void ETInit();
class A: public Object {
public:
MetaDef(A);
A()
{}
void bar()
{ cerr << "bar\n"; }
};
MetaImpl0(A);
class B: public A {
public:
MetaDef(B);
B()
{}
void foo()
{ cerr << "foo\n"; }
};
MetaImpl0(B);
main()
{
ETInit();
Object *o= new A;
Guard(o, A)->bar();
Guard(o, B)->foo();
}